pub fn dp_rec_mc(amount: u32) -> u32 {
    let coins = [100, 50, 30, 20, 10, 5, 2, 1];

    let mut num_coins = 0;
    let mut remaining_amount = amount;

    // 从最大面额到最小面额遍历
    for &coin in coins.iter() {
        // 计算当前面额可以用多少张
        let count = remaining_amount / coin;
        // 增加纸币的数量
        num_coins += count;
        // 更新剩余金额
        remaining_amount -= count * coin;
        
        if remaining_amount == 0 {
            break;
        }
    }

    num_coins
}